package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.domain.ServeProviderBank;
import com.jzo2o.customer.model.dto.request.BankAccountUpsertReqDTO;
import com.jzo2o.customer.service.IServeProviderBankService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.checkerframework.checker.units.qual.A;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("workerBankController")
@RequestMapping("/worker/bank-account")
@Api(tags = "服务端银行账户接口信息")
public class BankController {

    @Resource
    private IServeProviderBankService serveProviderBankService;

    @PostMapping()
    @ApiOperation("新增账户")
    public void saveAccount(@RequestBody BankAccountUpsertReqDTO bankAccountUpsertReqDTO) {
        serveProviderBankService.saveAccount(bankAccountUpsertReqDTO);
    }


    @GetMapping("/currentUserBankAccount")
    @ApiOperation("获取账户信息")
    public ServeProviderBank getAccount() {


        return serveProviderBankService.getAccount();
    }




}
